<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>Student Attendance</title>
        <script type="text/javascript" src="<?php echo base_url(); ?>validation_js/validation.js"></script>
        <link href="<?php echo base_url(); ?>css/style_master.css" rel="stylesheet" type="text/css" />  
        <link href="<?php echo base_url(); ?>css/report.css" rel="stylesheet" type="text/css" />        
        <link href="<?php echo base_url(); ?>css/jdate_picker/jquery.ui.all.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="<?php echo base_url(); ?>jscripts/js_datepicker/jquery-1.7.2.js"></script>
        <script type="text/javascript" src="<?php echo base_url(); ?>jscripts/js_datepicker/jquery.ui.core.js"></script>
        <script type="text/javascript" src="<?php echo base_url(); ?>jscripts/js_datepicker/jquery.ui.datepicker.js"></script>
        <script type="text/javascript" src="<?php echo base_url(); ?>jscripts/js_datepicker/jquery.ui.widget.js"></script>            
        <script type="text/javascript" src="<?php echo base_url(); ?>jscripts/charts/excanvas.min.js"></script>
        <script type="text/javascript" src="<?php echo base_url(); ?>jscripts/charts/jquery.flot.js"></script>
        <!--js date picker-->
        <!--popup-->       
        <!--end js date picker-->

        <!--[if IE 8]>
        <link href="<?php echo base_url(); ?>stylesheet/style_IE.css" rel="stylesheet" type="text/css" />
        <link href="<?php echo base_url(); ?>stylesheet/style_master_IE.css" rel="stylesheet" type="text/css" />
        <![endif]-->        
        <!--style for menu sale management -->
        <style type="text/css">
            body{padding:20px; font-size:14px; color:#000000; font-family:Arial, Helvetica, sans-serif;}
            h2 {font-weight:bold; color:#000099; margin:10px 0px; }
            p span {color:#006600; font-weight:bold; }
            a, a:link, a:visited {color:#0000FF;}
            textarea {width: 100%; padding: 10px; margin: 10px 0 15px 0; font-size: 13px; font-family: Consolas,monospace;}
            textarea.html {height: 300px;}
            p {margin: 0 0 10px 0;}
            code, pre {font-family: Consolas,monospace; color: green;}
            ol li {margin: 0 0 15px 0;}
        </style>
        <script language="javascript" type="text/javascript">
            $(function() {
                $( ".datepicker" ).datepicker({
                    changeMonth: true,
                    changeYear: true,
                    dateFormat: 'yy:mm:dd'
                });
            });

        </script>
    </head>
    <body>
        <!--Div for manage Logo and Label On the header of page master-->
        <div id="top">
            <div id="logo1"><a href="http://www.yogacambodia.com"><img src="<?php echo base_url(); ?>images/logo.gif" alt="Logo" /></a></div>
            <div id="logo2"><a href="http://www.yogacambodia.com"><img src="<?php echo base_url(); ?>images/NRY001_Logo-FINAL-master_01-horiz.jpg" alt="Logo" /></a></div>
            <div id="label"><h1>Administrator</h1></div>            
        </div>
        <!--End for manage logo and label on the header of page master-->
        <!--Div body for manage on menu the to bar-->
        <div id="wrapper" >
            <div id="mainmenu" style=" z-index: 5; position: relative;">
                <!--<div id="menu_left">&nbsp;</div>
                <div id="menu_right">&nbsp;</div>-->
                <div class="cssmenu" >
                    <ul id="super-menu">
                        <?php
                        // Create current page selected
                        $currentpage = $this->uri->segment(1); //First segment is /admin/
                        $currentpages = $this->uri->segment(2); //First segment is /admin/
                        $usertype = $this->session->userdata('user_type');
                        if ($usertype == '0') {
                            ?>
                            <li <?php
                        if ($currentpages == null || ($currentpage == 'students' && $currentpages != 'manager')) {
                            echo 'class="active"';
                        }
                            ?>>
                                    <?php echo anchor('students', 'Home'); ?>
                            </li>                                                  
                            <li <?php
                                if ($currentpage == 'students' && $currentpages == 'manager') {
                                    echo 'class="active"';
                                }
                                    ?>>
                                    <?php echo anchor('students/manager', 'Student'); ?>
                            </li>
                            <li <?php
                                if ($currentpage == 'attendance') {
                                    echo 'class="active"';
                                }
                                    ?>>
                                    <?php echo anchor('attendance/manager', 'attendance'); ?>
                            </li>

                            <li id="has-sub" <?php
                                if ($currentpage == 'card' || $currentpage == 'product') {
                                    echo 'class="active"';
                                }
                                    ?>>
                                <a href="#">Products management</a>
                                <ul id="menu-stock">
                                    <li><?php echo anchor('card/cardfolder', 'Cards Management'); ?></li>
                                    <li><?php echo anchor('product/productmanager', 'Meterials Management'); ?></li>
                                </ul>
                            </li>                             
                            <li <?php
                                if ($currentpage == 'sale_management') {
                                    echo 'class="active"';
                                }
                                    ?>>
                                    <?php echo anchor('sale_management/manager', 'Sale Management', 'onclick="current(this);return false;"'); ?>
                            </li>
                            <li <?php
                                if ($currentpage == 'report') {
                                    echo 'class="active"';
                                }
                                    ?>>
                                    <?php echo anchor('report/manager', 'View report'); ?>
                            </li>

                            <!-- for administrator if user type  = 1 condition of menu control if user type as administrator -->
                        <?php } else { ?>
                            <li <?php
                        if ($currentpage == 'students' && $currentpages != 'manager') {
                            echo 'class="active"';
                        }
                            ?>>
                                    <?php echo anchor('students', 'Home') ?>
                            </li>
                            <li <?php
                                if ($currentpage == 'user') {
                                    echo 'class="active"';
                                }
                                    ?>>
                                    <?php echo anchor('user/manager', 'User'); ?>
                            </li>
                            <li <?php
                                if ($currentpage == 'class_manager') {
                                    echo 'class="active"';
                                }
                                    ?>>
                                <a href="<?php echo base_url(); ?>class_manager/manager">Class</a>
                            </li>
                            <!--Drop down Menu People management-->
                            <li id="has-sub"<?php
                            if ($currentpage == 'teacher' || ($currentpage == 'students' && $currentpages == 'manager')) {
                                echo 'class="active"';
                            }
                                    ?>>
                                <a href="#">People Management</a>
                                <ul id="menu-people">
                                    <li><?php echo anchor('teacher/manager', 'Teachers Management'); ?></li>
                                    <li><?php echo anchor('students/manager', 'Students Management'); ?></li>
                                </ul>
                            </li>
                            <!--End Drop down Menu people management-->
                            <li <?php
                            if ($currentpage == 'attendance') {
                                echo 'class="active"';
                            }
                                    ?>>
                                    <?php echo anchor('attendance/manager', 'attendance'); ?>
                            </li>
                            <!-- Menu of drop down stock management Main Menu -->
                            <li id="has-sub" <?php
                                if ($currentpage == 'card' || $currentpage == 'product') {
                                    echo 'class="active"';
                                }
                                    ?>>
                                <a href="#">Products management</a>
                                <ul id="menu-stock">
                                    <li><?php echo anchor('card/cardfolder', 'Cards Management'); ?></li>
                                    <li><?php echo anchor('product/productmanager', 'Meterials Management'); ?></li>
                                </ul>
                            </li>
                            <!--End Drop down Menu Stock management-->
                            <li <?php
                            if ($currentpage == 'sale_management') {
                                echo 'class="active"';
                            }
                                    ?>>
                                    <?php echo anchor('sale_management/manager', 'Sale Management'); ?>
                            </li>
                            <li id="has-sub" <?php
                                if ($currentpage == 'report') {
                                    echo 'class="active"';
                                }
                                    ?>>
<!--                                    <a href="#">Report Management</a>-->
                                    <?php echo anchor('report/manager', 'Report Management'); ?>
                                 <ul id="menu-report">
                                     <li><?php //echo anchor('monthlyChart/manager', 'Monthly chart Report'); ?></li>
                                     <li><?php echo anchor('chart/manager', 'Yearly chart report'); ?></li>
                                   
                                </ul>
                            </li>
                        <?php }//Eng of condition control menu else above   ?>
                    </ul>
                </div>
            </div>

            <div class="clear" style="clear: both;">&nbsp;</div>
            <div id="content"  style=" display: block; z-index: 1px;">
                <div id="top_content">
                    <div id="content_top_left">&nbsp;</div>
                    <div id="content_top_right">&nbsp;</div>
                    <div id="content_top_m">&nbsp;</div>
                </div>

                <div id="main_content">
                    <div id="logout">
                        <?php
                        echo 'Welcome <b>' . $this->session->userdata('use_username') . '&nbsp;&nbsp;';
                        echo anchor('admin/logout', 'Sign out&nbsp;&nbsp;') . anchor('admin/logout', img('images/shutdown.png'));
                        $superadmin = $this->session->userdata('name_user_type');
                        ?>
                    </div>
                    <?php
                    if (!$this->uri->segment(2))
                        $this->load->view('menu');
                    else
                        $this->load->view($this->uri->segment('1') . '/' . $this->uri->segment(2));
                    ?>
                </div>
                <div id="bottom_content">
                    <div id="content_bottom_left">&nbsp;</div>
                    <div id="content_bottom_right">&nbsp;</div>
                    <div id="content_bottom_m">&nbsp;</div>
                </div>
            </div>
            <div class="clear">&nbsp;</div>
        </div>
        </div>

        <div id="footer">
            <div id="copy_right">Krama Yogo Cambodia <br />&copy; Isabelles Skaburskis  2012</div>
            <div id="image_fotter"><img src="<?php echo base_url(); ?>images/footer_imge.png" alt="footer image" /></div>
        </div>
    </body>
</html>
